package com.tomato.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("todo_record")
@Schema(description = "待办完成记录实体")
public class TodoRecord {
    @TableId(type = IdType.AUTO)
    @Schema(description = "主键，自增")
    private Long id;

    @Schema(description = "关联的用户 ID")
    private Long userId;

    @Schema(description = "本次开始时间")
    private LocalDateTime startTime;

    @Schema(description = "本次结束时间；倒计时到点或正向计时手动结束")
    private LocalDateTime endTime;

    @Schema(description = "0=进行中/未达标；1=已完成（含休息或跳过）")
    private Boolean finished = false;

    @Schema(description = "本次实际完成的总专注秒数")
    private Integer actualFocusSeconds = 0;

    @Schema(description = "本次实际休息秒数（用户可跳过）")
    private Integer actualRestSeconds = 0;

    @Schema(description = "记录生成时间")
    private LocalDateTime createdAt;
}